package net.zjitc.mapper;

import net.zjitc.pojo.User;
import org.apache.ibatis.annotations.Param;

/**
 * @author 赵静静
 * @date 2019/3/22 11:27
 */
public interface UserMapper {
  int checkUsername(String username);
  User selectLogin(@Param(value = "username") String username,
                   @Param(value = "password")String password);

    int insert(User user);

  int checkEmail(String str);

  String selectQuestionByUsername(String username);

  int checkAnswer(@Param(value = "username") String username,
                  @Param(value = "question")String question,
                  @Param(value = "answer")String answer);

    int updatePasswordByUsername(@Param(value = "username") String username,
                                 @Param(value = "md5Password") String md5Password);

    int checkPassword(@Param(value = "password") String password,
                      @Param(value = "userId") int userId);

    int updateByPrimaryKeySelective(User user);
}
